package com.atguigu.gulimall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;


@EnableRedisHttpSession
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(basePackages="com.atguigu.gulimall.product.feign")

/**
 * springboot2.0使用了letture操作redis客户端,他使用netty进行网络通信
 * 如果没有指定堆外内存默认使用Xmx300m的值
 * 可以通过-Dio.netty.maxDirectMemory
 * 解决方案:不能使用  -Dio.netty.maxDirectMemory堆外内存
 * //1.升级lettuce
 * //2.切换使用jedis--
 */
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
